Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some minor test corrections #57

Merged
merged 2 commits into from
Aug 15, 2018
Merged

Some minor test corrections #57

merged 2 commits into from
Aug 15, 2018

Conversation

tovbinm
Copy link
Collaborator

@tovbinm tovbinm commented Aug 15, 2018

No description provided.

)

property("validate numbers") {
forAll(tests) { d =>
forAll { d: Double =>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ajayborra this will automatically magnet generator for any arbitrary d: Double

}

property("validate special numbers") {
forAll(specials) { d =>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ajayborra here we explicitly pass in specials table

val listener = new OpSparkListener(sc.appName, sc.applicationId, "testRun", Some("tag"), Some("tagValue"), true, true)
sc.addSparkListener(listener)
spark.read.csv(s"$testDataDir/PassengerDataAll.csv")
val _ = spark.read.csv(s"$testDataDir/PassengerDataAll.csv").count()
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually running some job here, i.e count rows

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, Saw the changes below

@@ -43,8 +43,9 @@ class RichTupleTest extends FlatSpec with TestCommon {
res.get shouldBe 3
}

it should "not map empty tuples" in {
assertDoesNotCompile("(None, None).map((x, y) => x + y)")
it should "map on empty tuples" in {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(None, None).map actually works if the types are set, so I corrected the test.


val specials = Table("specials",
Double.MinValue, Double.MaxValue,
Double.MinPositiveValue, Double.MinPositiveValue, Double.NaN,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double.MinPositiveValue is repeated.

Copy link
Contributor

@ajayborra ajayborra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Minor comment related to repeated Double.MinPositiveValue

@tovbinm tovbinm merged commit 6a308ad into master Aug 15, 2018
@tovbinm tovbinm deleted the mt/text-corrections branch August 15, 2018 16:00
ericwayman pushed a commit that referenced this pull request Feb 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants